package com.corona.game;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.corona.Game;
import com.corona.game.util.TextureCache;

/* compiled from: Action.java */
/* loaded from: pokewilds.jar:com/pkmngen/game/DrawMobileControls.class */
public class DrawMobileControls extends Action {
    public static Sprite upArrowSprite = new Sprite();
    public static Sprite downArrowSprite = new Sprite();
    public static Sprite leftArrowSprite = new Sprite();
    public static Sprite rightArrowSprite = new Sprite();
    public static Sprite aSprite = new Sprite();
    public static Sprite bSprite = new Sprite();
    public static Sprite startSprite = new Sprite();

    public DrawMobileControls(Game game) {
        super(new Object[0]);
        Texture text = TextureCache.get(Gdx.files.internal("gb_arrow2.png"));
        upArrowSprite = new Sprite(text, 0, 0, 24, 24);
        downArrowSprite = new Sprite(text, 0, 0, 24, 24);
        downArrowSprite.flip(false, true);
        rightArrowSprite = new Sprite(text, 0, 0, 24, 24);
        rightArrowSprite.rotate90(true);
        leftArrowSprite = new Sprite(text, 0, 0, 24, 24);
        leftArrowSprite.rotate90(false);
        aSprite = new Sprite(text, 0, 0, 24, 24);
        bSprite = new Sprite(text, 0, 0, 24, 24);
        startSprite = new Sprite(text, 0, 0, 24, 24);
    }

    @Override // com.corona.game.Action
    public void firstStep(Game game) {
        float scaleX = 160.0f / game.currScreen.x;
        int offsetY = ((int) (((game.currScreen.y - (144.0f / scaleX)) / 2.0f) * scaleX)) + 32;
        upArrowSprite.setPosition(30.0f, (float) ((90 - offsetY) - 35));
        downArrowSprite.setPosition(30.0f, (float) ((40 - offsetY) - 35));
        leftArrowSprite.setPosition(5.0f, (float) ((65 - offsetY) - 35));
        rightArrowSprite.setPosition(55.0f, (float) ((65 - offsetY) - 35));
        bSprite.setPosition(100.0f, (float) ((75 - offsetY) - 35));
        aSprite.setPosition(125.0f, (float) ((85 - offsetY) - 35));
        startSprite.setPosition(100.0f, (float) ((45 - offsetY) - 35));
    }

    @Override // com.corona.game.Action
    public void step(Game game) {
        upArrowSprite.draw(game.uiBatch);
        downArrowSprite.draw(game.uiBatch);
        leftArrowSprite.draw(game.uiBatch);
        rightArrowSprite.draw(game.uiBatch);
        aSprite.draw(game.uiBatch);
        bSprite.draw(game.uiBatch);
        startSprite.draw(game.uiBatch);
    }

    @Override // com.corona.game.Action
    public String getCamera() {
        return "gui";
    }

    @Override // com.corona.game.Action
    public Action.Layer getLayer() {
        return Action.Layer.gui_0;
    }
}
